<?php
/**
 * Created by PhpStorm.
 * User: QK
 * Date: 2018-07-25
 * Time: 上午 10:21
 */
namespace app\backstage\controller;
use app\backstage\validate\GoodsValidate;
use cmf\controller\AdminBaseController;
class GoodsController extends AdminBaseController{
    /**
     * 商品列表页面
    */
    public function index(){

        return $this->fetch();
    }
    /**
     * 添加商品页面
    */
    public function add(){
        return $this->fetch();
    }
    /**
     * 添加商品操作
    */
    public function addPost(){
        $date = $this->request->post();
        $validate = new GoodsValidate();
        if(!$validate->check($date)){
            $this->error($validate->getError());
        }
    }
    /**
     * 修改商品页面
    */
    public function detail(){
        return $this->fetch();
    }

}